Content publishing method and user equipment

ABSTRACT

Embodiments of the present invention provide a content publishing method and a user equipment. The content publishing method includes: obtaining, by a first user equipment supporting a D2D function, a resource for broadcasting information of the first user equipment. The method also includes broadcasting, by the first user equipment, the information of the first user equipment on the obtained resource, so that a second user equipment obtains and sends the information of the first user equipment to a network-side device to set up a connection with the first user equipment, where the second user equipment supports the D2D function and is matched with the first user equipment.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. patent application Ser. No.15/286,132, filed on Oct. 5, 2016, which is a continuation of U.S.patent application Ser. No. 14/228,882, filed on Mar. 28, 2014, now U.S.Pat. No. 9,485,796, which is a continuation of International ApplicationNo. PCT/CN2012/082575, filed on Oct. 8, 2012. The InternationalApplication claims priority to Chinese Patent Application No.201110297621.7, filed on Sep. 30, 2011. All of the afore-mentionedpatent applications are hereby incorporated by reference in theirentireties.

TECHNICAL FIELD

Embodiments of the present invention relate to the field ofcommunications technologies, and in particular, to a content publishingmethod and a user equipment.

BACKGROUND

A device to device (D2D) communications technology may implementservices and data applications in a local self-organizing (ad-hoc)network and short-range communication.

To improve spectrum utilization, a D2D system and a cellular systemshare same resources. To access the cellular system, a D2D terminal inthe D2D system needs to comply with the time and timeslot of thecellular system. The D2D system may support services such as informationsharing, gaming, social services, mobile advertising, and so on.

The D2D terminal in the D2D system has a function of sensing radioresources, that is, the D2D terminal actively senses an externalenvironment, and actively manages and configures resources according toa sensed result, not requiring control and allocation of an evolvedpacket core network (EPC) or an evolved universal mobiletelecommunications system terrestrial radio access network (E-UTRAN),and with no authentication and certification of an operator network,which is unfavorable for proper allocation of resources and secureoperation of a network. In addition, in a content publishing aspect, itis impossible to solve problems about how a matched terminal obtainsquality of service (QoS) information and how guaranteed services can beprovided.

SUMMARY

Embodiments of the present invention provide a content publishing methodand a user equipment, so that a matched terminal can obtain QoSinformation, and guaranteed services can be provided for device todevice (D2D) communication.

An embodiment of the present invention provides a content publishingmethod. A first user equipment supporting a D2D function obtains aresource for broadcasting information of the first user equipment. Theinformation of the first user equipment includes one or a combination ofan identifier, service information, a service code, and applicationlayer service information of the first user equipment. The first userequipment broadcasts the information of the first user equipment on theobtained resource, so that a second user equipment supporting the D2Dfunction obtains the information of the first user equipment. Afterbeing matched with the first user equipment successfully, the first userequipment sends the information of the first user equipment to anetwork-side device to set up a connection with the first userequipment.

An embodiment of the present invention further provides a first userequipment that supports a device to device D2D function. An obtainingmodule is configured to obtain a resource for broadcasting informationof the first user equipment. The information of the first user equipmentincludes one or a combination of an identifier, service information, aservice code, and application layer service information of the firstuser equipment. A broadcasting module is configured to broadcast theinformation of the first user equipment on the resource obtained by theobtaining module, so that a second user equipment supporting the D2Dfunction obtains the information of the first user equipment. Afterbeing matched with the first user equipment successfully, thebroadcasting module is configured to send the information of the firstuser equipment to a network-side device to set up a connection with thefirst user equipment.

In the embodiments of the present invention, after a first userequipment supporting a D2D function obtains a resource for broadcastinginformation of the first user equipment, the first user equipmentbroadcasts the information of the first user equipment on the obtainedresource. The information of the first user equipment includes one or acombination of an identifier, service information, a service code, andapplication layer service information of the first user equipment. Thena second user equipment supporting the D2D function may obtain theinformation of the first user equipment and after being matched with thefirst user equipment successfully, send the information of the firstuser equipment to a network-side device to set up a connection with thefirst user equipment. In this way, a matched terminal can obtain QoSinformation, and guaranteed services can be provided for D2Dcommunication.

BRIEF DESCRIPTION OF THE DRAWINGS

To describe the technical solutions in the embodiments of the presentinvention more clearly, the following briefly introduces theaccompanying drawings required for describing the embodiments.Apparently, the accompanying drawings in the following description showmerely some embodiments of the present invention, and persons ofordinary skill in the art may still derive other drawings from theseaccompanying drawings without creative efforts.

FIG. 1 is a flowchart of an embodiment of a content publishing methodaccording to the present invention;

FIG. 2 is a flowchart of another embodiment of a content publishingmethod according to the present invention;

FIG. 3 is a flowchart of another embodiment of a content publishingmethod according to the present invention;

FIG. 4 is a flowchart of another embodiment of a content publishingmethod according to the present invention;

FIG. 5 is a schematic structural diagram of an embodiment of a firstuser equipment according to the present invention;

FIG. 6 is a schematic structural diagram of another embodiment of afirst user equipment according to the present invention; and

FIG. 7 is a schematic structural diagram of another embodiment of afirst user equipment according to the present invention.

DETAILED DESCRIPTION OF ILLUSTRATIVE EMBODIMENTS

To make the objectives, technical solutions, and advantages of theembodiments of the present invention more comprehensible, the followingdescribes the technical solutions in the embodiments of the presentinvention with reference to the accompanying drawings in the embodimentsof the present invention. Apparently, the described embodiments aremerely a part rather than all of the embodiments of the presentinvention. All other embodiments obtained by persons of ordinary skillin the art based on the embodiments of the present invention withoutcreative efforts shall fall within the protection scope of the presentinvention.

FIG. 1 is a flowchart of an embodiment of a content publishing methodaccording to the present invention. As shown in FIG. 1, the contentpublishing method may include the following steps.

Step 101: A first user equipment supporting a D2D function obtains aresource for broadcasting information of the first user equipment, wherethe information of the first user equipment includes one or acombination of an identifier, service information, a service code, andapplication layer service information of the first user equipment.

The identifier may be: one or a combination of a physical identifier, anon-access stratum identifier (NAS ID), and an access stratum identifier(AS ID). For example, the physical identifier may be a specific codesequence such as an international mobile subscriber identity (IMSI). TheNAS ID may be a serving temporary mobile subscriber identity (s-TMSI) oran old GUTI. The AS ID may be a cell radio network temporary identifier(C-RNTI) or a D-RNTI (namely, a radio network temporary identifier(RNTI) used for D2D).

The application layer service information includes service informationthat a user may understand. The service information that the user mayunderstand includes a service type and/or service content. For example,the service content may be advertisement information, a video of amovie, or a game, and so on.

The service code may be a character, a character string, or a digitsequence, and may represent application layer service information.

The service information may be non-access stratum (NAS) informationrequired by the user equipment for constructing a connection setuprequest message of a service, and include QoS information and so on.

Step 102: The first user equipment broadcasts the information of thefirst user equipment on the obtained resource, so that a second userequipment supporting the D2D function obtains the information of thefirst user equipment and after being matched with the first userequipment successfully, sends the information of the first userequipment to a network-side device to set up a connection with the firstuser equipment.

Specifically, the broadcasting, by the first user equipment, theinformation of the first user equipment on the obtained resource, maybe: broadcasting, by the first user equipment, the information of thefirst user equipment on the obtained resource periodically in adiscontinuous transmission mode.

In an implementation manner of this embodiment, the obtaining, by afirst user equipment supporting a D2D function, a resource forbroadcasting information of the first user equipment, may be: obtaining,by the first user equipment, resources that are allocated in advance bya serving base station of a cell where the first user equipment iscurrently located to user equipment supporting the D2D function in thecell and are used for broadcasting the information of the userequipment, where the resources are broadcast by the serving base stationthrough a broadcast message; and selecting, by the first user equipmentby automatic search or measurement, a resource whose interference levelis lower than a predetermined threshold, from the resources allocated inadvance by the serving base station. Optionally, the allocation mannerof the serving base station is semi-static.

In another implementation manner of this embodiment, the obtaining, by afirst user equipment supporting a D2D function, a resource forbroadcasting information of the first user equipment, may be: selecting,by the first user equipment according to interference levels ofsub-resources and position information of the sub-resources that arebroadcast by a serving base station of a cell where the first userequipment is currently located, a sub-resource whose interference levelis lower than a predetermined threshold, from the sub-resourcesbroadcast by the serving base station, where the sub-resources areobtained after the serving base station divides resources that areallocated in advance by the serving base station to user equipmentsupporting the D2D function in the cell and are used for broadcastingthe information of the user equipment.

In another implementation manner of this embodiment, the obtaining, by afirst user equipment supporting a D2D function, a resource forbroadcasting information of the first user equipment, may be setting up,by the first user equipment, a connection with a serving base station ofa cell where the first user equipment is currently located, andtriggering the serving base station to allocate a resource to the firstuser equipment to broadcast the information of the first user equipment.Specifically, the setting up, by the first user equipment, a connectionwith a serving base station of a cell where the first user equipment iscurrently located, may be: sending, by the first user equipment, a radioresource control connection setup message or a radio resource controlconnection setup complete message to the serving base station, where theradio resource control connection setup message or the radio resourcecontrol connection setup complete message carries an information elementindicating that the first user equipment supports the D2D function,and/or a value of a setup cause information element in the radioresource control connection setup message is D2D connection or D2Dcontent publishing.

Further, after the first user equipment sets up the connection with theserving base station of the cell where the first user equipment iscurrently located, the first user equipment may maintain a commonconnected state or a long discontinuous reception mode in a connectedstate; in addition, before the first user equipment leaves the cell, thefirst user equipment may notify the serving base station of recyclingthe resource that is allocated to the first user equipment and used forbroadcasting the information of the first user equipment.

In this implementation manner, in the process of setting up, by thefirst user equipment, the connection with the serving base station ofthe cell where the first user equipment is currently located, the firstuser equipment may further send the service information of the firstuser equipment, or the service information and application layer serviceinformation of the first user equipment, or the service information andservice code of the first user equipment, or the service information,application layer service information, and service code of the firstuser equipment to the serving base station or an evolved packet corenetwork (EPC) entity device. In this case, if the information broadcastby the first user equipment includes the application layer serviceinformation and/or service code of the first user equipment, but doesnot include the service information of the first user equipment, thesecond user equipment may send the application layer service informationand/or service code of the first user equipment to the serving basestation or the EPC entity device, receive the service information of thefirst user equipment that is sent by the serving base station or the EPCentity device according to the application layer service informationand/or service code of the first user equipment, generate a non-accessstratum message according to the service information of the first userequipment, and send the non-access stratum message to a network-sidedevice to set up a connection with the first user equipment.

Alternatively, the second user equipment may send a connection setuprequest message to the serving base station, where the connection setuprequest message carries the application layer service information and/orservice code of the first user equipment, so that after receiving theconnection setup request message sent by the second user equipment, theserving base station obtains the service information of the first userequipment locally or from the EPC entity device according to theapplication layer service information and/or service code of the firstuser equipment carried in the connection setup request message, adds theservice information of the first user equipment to the connection setuprequest message sent by the second user equipment, and sends theconnection setup request message to a core network device after theservice information of the first user equipment is added.

In an implementation manner of this embodiment, sending the informationof the first user equipment to a network-side device to set up aconnection with the first user equipment may be: when the informationbroadcast by the first user equipment includes the service informationof the first user equipment, generating, by the second user equipment, anon-access stratum message according to the service information of thefirst user equipment, and sending the non-access stratum message to thenetwork-side device to set up a connection with the first userequipment.

In another implementation manner of this embodiment, before the firstuser equipment broadcasts the information of the first user equipment onthe obtained resource, the first user equipment may further send theapplication layer service information of the first user equipment to aservice management server, and receive the service informationcorresponding to the first user equipment and the service code allocatedby the service management server to the first user equipment, where theservice information is found by the service management server accordingto the application layer service information of the first userequipment. In this case, the sending the information of the first userequipment to the network-side device to set up the connection with thefirst user equipment may be: when the information broadcast by the firstuser equipment includes the application layer service information and/orservice code of the first user equipment, but does not include theservice information of the first user equipment, the second userequipment sends the application layer service information and/or servicecode of the first user equipment to the service management server,receives the service information of the first user equipment sent by theservice management server according to the application layer serviceinformation and/or service code of the first user equipment, generates anon-access stratum message according to the service information of thefirst user equipment, and sends the non-access stratum message to thenetwork-side device to set up a connection with the first userequipment.

In this embodiment, the cell where the first user equipment is currentlylocated includes a target cell to which the first user equipment ishanded over, or a cell where the first user equipment is powered on.

In the above embodiment, after the first user equipment supporting theD2D function obtains the resource for broadcasting the information ofthe first user equipment, the first user equipment broadcasts theinformation of the first user equipment on the obtained resource, wherethe information of the first user equipment includes one or acombination of an identifier, service information, a service code, andapplication layer service information of the first user equipment; andthen a second user equipment supporting the D2D function may obtain theinformation of the first user equipment and after being matched with thefirst user equipment successfully, send the information of the firstuser equipment to a network-side device to set up a connection with thefirst user equipment. In this way, a matched terminal can obtain QoSinformation, and guaranteed services can be provided for D2Dcommunication.

FIG. 2 is a flowchart of another embodiment of a content publishingmethod according to the present invention. As shown in FIG. 2, thecontent publishing method may include the following steps.

Step 201: A base station allocates in advance resources to all UEssupporting a D2D function in a cell where the base station is located,where the resources are used for broadcasting information of the UEs,and broadcasts the resources through a broadcast message.

In this embodiment, the base station may be an evolved NodeB (eNB).Definitely, the embodiment of the present invention is not limitedthereto. The embodiment of the present invention does not limit the formof the base station. The information includes one or a combination of anidentifier, service information, a service code, and application layerservice information of the UE supporting the D2D function.

The identifier may be: one or a combination of a physical identifier, aNAS ID, and an AS ID. For example, the physical identifier may be aspecific code sequence such as an IMSI; the NAS ID may be an s-TMSI oran old GUTI; and the AS ID may be a C-RNTI or a D-RNTI (namely, an RNTIused for D2D).

The application layer service information includes service informationthat a user may understand. The service information that the user mayunderstand includes a service type and/or service content. For example,the service content may be advertisement information, a video of amovie, or a game, and so on.

The service code may be a character, a character string, or a digitsequence, and may represent application layer service information.

The service information may be NAS information required by a UE forconstructing a connection setup request message of a service, andinclude QoS information and so on.

Step 202: When a UE 1 supporting the D2D function is handed over to thecell where the base station is located, or powered on in the cell wherethe base station is located, the UE 1 obtains the resources according tothe broadcast message sent by the base station.

In this embodiment, when the UE 1 supporting the D2D function is handedover to the cell where the base station is located, or powered on in thecell where the base station is located, the UE 1 may receive thebroadcast message sent by the base station. The UE 1 may obtain,according to the broadcast message, the resources that are allocated inadvance by the base station to all D2D UEs in the cell where the basestation is located, where the resources are used for broadcastinginformation of the UEs.

Step 203: The UE 1 selects by automatic search or measurement, aresource whose interference level is lower than a predeterminedthreshold, from the resources allocated in advance by the base station,thereby avoiding interference from other UEs supporting the D2D functionor interference to other UEs supporting the D2D function.

In this case, on the Uu interface, a radio resource control idle(RRC_Idle) state is maintained between the UE 1 and the base station.

Step 204: The UE 1 broadcasts information of the UE 1 on the selectedresource.

In this embodiment, the information of the UE 1 broadcast by the UE 1 isnot further described herein. For details, reference may be made to theexample in step 201.

Specifically, the UE supporting the D2D function has discontinuousreception (DRX) and discontinuous transmission (DTX) features.

Therefore, in this embodiment, the manner of broadcasting information ofthe UE 1 by the UE 1 may be a DTX manner: broadcasting information ofthe UE 1 on the selected resource in a discontinuous transmission cycle(DTX-Cycle).

In this embodiment, after the UE 1 broadcasts the information of the UE1, other UEs supporting the D2D function than the UE 1 in the cell wherethe UE 1 is located have an opportunity to detect the UE 1.

Step 205: When a UE 2 supporting the D2D function in the cell where theUE 1 is located knows, by using a sensing technology or by searching forand measuring other UEs supporting the D2D function than the UE 2 in thecell, that a possible matched UE 1 exists, a matching process isstarted.

Specifically, the UE 2 may search, in the DRX manner, for informationbroadcast by other UEs supporting the D2D function than the UE 2 in thecell where the UE 2 is located, on some specific resources, and afterknowing that a possible matched UE 1 exists, receive information of theUE 1 broadcast by the UE 1; or the UE 2 may also receive, in an eventtrigger manner, information of the UE 1 broadcast by the UE 1, forexample, when a user has a specific requirement, a receiving action istriggered through a man-machine interface; or an application layertriggers a receiving action according to a requirement profilepreviously customized by the user. Definitely, the UE 2 may alsoreceive, by using a combination of the DRX and event trigger manners,the information of the UE 1 broadcast by the UE 1.

Step 206: After the UE 1 is matched with the UE 2 successfully, the UE 2sends the information of the UE 1 to a network-side device to set up aconnection with the UE 1.

Specifically, in an implementation manner of this embodiment, when theinformation of the UE 1 broadcast by the UE 1 includes serviceinformation of the UE 1, the UE 2 may generate a NAS message accordingto the service information of the UE 1, and send the NAS message to thenetwork-side device to set up a connection with the UE 1.

In another implementation manner of this embodiment, before step 204,the UE 1 may send the application layer service information of the UE 1to a service management server, and receive the service informationcorresponding to the UE 1 and the service code allocated by the servicemanagement server to the UE 1, where the service information is found bythe service management server according to the application layer serviceinformation of the UE 1. When the information broadcast by the UE 1includes the application layer service information and/or service codeof the UE 1, but does not include the service information of the UE 1,the UE 2 may send the application layer service information and/orservice code of the UE 1 to the service management server, receive theservice information of the UE 1 sent by the service management serveraccording to the application layer service information and/or servicecode of the UE 1, generate a NAS message according to the serviceinformation of the UE 1, and send the NAS message to the network-sidedevice to set up a connection with the UE 1.

According to the above embodiment, a matched terminal can obtain QoSinformation, and guaranteed services can be provided for D2Dcommunication.

FIG. 3 is a flowchart of another embodiment of a content publishingmethod according to the present invention. As shown in FIG. 3, thecontent publishing method may include the following steps.

Step 301: A base station divides resources that are allocated in advanceby the base station to UEs supporting a D2D function in a cell where thebase station is located and are used for broadcasting information of theUEs, into sub-resources.

In this embodiment, the base station may be an eNB. Definitely, theembodiment of the present invention is not limited thereto. Theembodiment of the present invention does not limit the form of the basestation. The information includes one or a combination of an identifier,service information, a service code, and application layer serviceinformation of the UEs supporting the D2D function.

The identifier may be: one or a combination of a physical identifier, aNAS ID, and an AS ID. For example, the physical identifier may be aspecific code sequence such as an IMSI; the NAS ID may be an s-TMSI oran old GUTI; and the AS ID may be a C-RNTI or a D-RNTI (namely, an RNTIused for D2D).

The application layer service information includes service informationthat a user may understand. The service information that the user mayunderstand includes a service type and/or service content. For example,the service content may be advertisement information, a video of amovie, or a game, and so on.

The service code may be a character, a character string, or a digitsequence, and may represent application layer service information.

The service information may be NAS information required by a UE forconstructing a connection setup request message of a service, andinclude QoS information and so on.

Specifically, the base station may divide the resources intosub-resources according to the granularity of a time domain, frequencydomain, and/or space domain.

Step 302: The base station broadcasts interference levels of thesub-resources and position information of the sub-resources through abroadcast message.

In this embodiment, the base station may update the interference levelsand position information of the sub-resources according to theinformation measured and reported by UEs in the cell where the basestation is located.

Step 303: When a UE 1 supporting the D2D function is handed over to thecell where the base station is located, or powered on in the cell wherethe base station is located, the UE 1 selects a sub-resource whoseinterference level is lower than a predetermined threshold, from thesub-resources.

Specifically, when the UE 1 supporting the D2D function is handed overto the cell where the base station is located, or powered on in the cellwhere the base station is located, the UE 1 may receive a broadcastmessage sent by the base station, and further the UE 1 may readinterference levels and position information of sub-resources in thebroadcast message. Then the UE 1 may select, according to theinterference levels and position information of the sub-resources in thebroadcast message, a sub-resource whose interference level is lower thana predetermined threshold, thereby avoiding interference from other UEssupporting the D2D function or interference to other UEs supporting theD2D function. For example, assuming that the interference levels of thesub-resources divided by the base station include three levels: high,medium, and low, the UE 1 may select a sub-resource whose interferencelevel is medium or low, that is, select the sub-resource whoseinterference level is lower than the high level.

In this case, on the Uu interface, a radio resource control idle(RRC_Idle for short below) state is maintained between the UE 1 and thebase station.

Step 304 to step 306 are the same as step 204 to step 206, and are notfurther described herein.

According to the above embodiment, a matched terminal can obtain QoSinformation, and guaranteed services can be provided for D2Dcommunication.

FIG. 4 is a flowchart of another embodiment of a content publishingmethod according to the present invention. As shown in FIG. 4, thecontent publishing method may include the following.

Step 401: In a process of setting up a connection with a network, a UE 1supporting a D2D function sends application layer service information ofthe UE 1 to a service management server.

Specifically, when the UE 1 supporting the D2D function provides aservice, the UE 1 sends application layer service information of the UE1 to the service management server in the process of setting up aconnection with the network.

The application layer service information includes service informationthat a user may understand. The service information that the user mayunderstand includes a service type and/or service content. For example,the service content may be advertisement information, a video of amovie, or a game, and so on.

Step 402: The service management server finds, according to theapplication layer service information sent by the UE 1, serviceinformation corresponding to the UE 1, allocates a service code to theUE 1, and sends the service information corresponding to the UE 1 andthe service code allocated to the UE 1 to the UE 1.

The service information may be NAS information required by the UE 1 forconstructing a connection setup request message of a service, andinclude QoS information and so on.

In this embodiment, steps 401 and 402 are optional steps.

Step 403: When the UE 1 is handed over to a cell or powered on in acell, the UE 1 sets up a connection with a serving base station of thecell, and triggers the serving base station to allocate a resource tothe UE 1 to broadcast information of the UE1.

In this embodiment, the serving base station may be an eNB. Definitely,the embodiment of the present invention is not limited thereto. Theembodiment of the present invention does not limit the form of theserving base station.

Specifically, when the UE 1 is handed over to the cell or is powered onin the cell, the UE 1 may set up a connection with the serving basestation of the cell, and obtain, from the serving base station, aresource for broadcasting information of the UE 1, no matter whether areal service of the UE 1 exists. In a specific implementation, thesetting up, by the UE 1, a connection with the serving base station ofthe cell may be: sending, by the UE 1, an RRC connection setup messageor an RRC connection setup complete message to the serving base station,where the RRC connection setup message or the RRC connection setupcomplete message carries an information element indicating that the UE 1supports the D2D function, and/or a value of a setup cause informationelement in the RRC connection setup message is D2D connection or D2Dcontent publishing.

Step 404: In the process of setting up a connection with the servingbase station, the UE 1 sends the service information of the UE 1, or theservice information and application layer service information of the UE1, or the service information and service code of the UE 1, or theservice information, application layer service information, and servicecode of the UE 1 to the serving base station or an evolved packet corenetwork (EPC) entity device.

In this embodiment, step 404 is an optional step.

Step 405: On the Uu interface, after the UE 1 sets up a connection withthe serving base station, the UE 1 maintains a common connected state ora long DRX mode in a connected state.

In addition, in this embodiment, when the UE 1 leaves the cell where theserving base station is located, the UE 1 needs to notify the servingbase station of recycling the resource that is allocated to the UE 1 andused for broadcasting the information of the UE 1.

Step 406: The UE 1 broadcasts the information of the UE 1 on theresource that is allocated by the serving base station to the UE 1 andused for broadcasting the information of the UE 1.

In this embodiment, the information of the UE 1 broadcast by the UE 1may include one or a combination of an identifier, service information,a service code, and application layer service information of the UE 1.

The identifier may be: one or a combination of a physical identifier, aNAS ID, and an AS ID. For example, the physical identifier may be aspecific code sequence such as an IMSI; the NAS ID may be an s-TMSI oran old GUTI; and the AS ID may be a C-RNTI or a D-RNTI (namely, an RNTIused for D2D).

The application layer service information includes service informationthat a user may understand. The service information that the user mayunderstand includes a service type and/or service content. For example,the service content may be advertisement information, a video of amovie, or a game, and so on.

The service code may be a character, a character string, or a digitsequence, and may represent application layer service information.

The service information may be NAS information required by the UE 1 forconstructing a connection setup request message of a service, andinclude QoS information and so on.

Specifically, the UE supporting the D2D function has DRX and DTXfeatures.

Therefore, in this embodiment, the manner of broadcasting information ofthe UE 1 by the UE 1 may be a DTX manner: broadcasting, in adiscontinuous transmission cycle (DTX-Cycle), information of the UE 1 onthe resource that is allocated by the serving base station to the UE 1.

In this embodiment, after the UE 1 broadcasts the information of the UE1, other UEs supporting the D2D function than the UE 1 in the cell wherethe UE 1 is located have an opportunity to detect the UE 1.

Step 407: When a UE 2 supporting the D2D function in the cell where theUE 1 is located knows, by using a sensing technology or by searching forand measuring other UEs supporting the D2D function than the UE 2 in thecell, that a possible matched UE 1 exists, a matching process isstarted.

Specifically, the UE 2 may search, in the DRX manner, for informationbroadcast by other UEs supporting the D2D function than the UE 2 in thecell where the UE 2 is located, on some specific resources, and afterknowing that a possible matched UE 1 exists, the UE 2 receivesinformation of the UE 1 broadcast by the UE 1; or the UE 2 may alsoreceive, in an event trigger manner, information of the UE 1 broadcastby the UE 1, for example, when a user has a specific requirement, areceiving action is triggered through a man-machine interface; or anapplication layer triggers a receiving action according to a requirementprofile (profile) previously customized by the user. Definitely, the UE2 may also receive, using a combination of the DRX and event triggermanners, the information of the UE 1 broadcast by the UE 1.

Step 408: After the UE 1 is matched with the UE 2 successfully, the UE 2sends the information of the UE 1 to a network-side device to set up aconnection with the UE 1.

Specifically, in an implementation manner of this embodiment, when theinformation of the UE 1 broadcast by the UE 1 includes serviceinformation of the UE 1, the UE 2 may generate a NAS message accordingto the service information of the UE 1, and send the NAS message to thenetwork-side device to set up a connection with the UE 1.

In another implementation manner of this embodiment, if step 401 andstep 402 exist, when the information broadcast by the UE 1 includes theapplication layer service information and/or service code of the UE 1,but does not include the service information of the UE 1, the UE 2 maysend the application layer service information and/or service code ofthe UE 1 to the service management server, receive the serviceinformation of the UE 1 sent by the service management server accordingto the application layer service information and/or service code of theUE 1, generate a NAS message according to the service information of theUE 1, and send the NAS message to the network-side device to set up aconnection with the UE 1.

In another implementation manner of this embodiment, if step 404 exists,when the information broadcast by the UE 1 includes the applicationlayer service information and/or service code of the UE 1, but does notinclude the service information of the UE 1, the UE 2 may send theapplication layer service information and/or service code of the UE 1 tothe serving base station or EPC entity device, receive the serviceinformation of the UE 1 sent by the serving base station or EPC entitydevice according to the application layer service information and/orservice code of the UE 1, generate a NAS message according to theservice information of the UE 1, and send the NAS message to thenetwork-side device to set up a connection with the UE 1.

Alternatively, the UE 2 may send a connection setup request message tothe serving base station, where the connection setup request messagecarries the application layer service information and/or service code ofthe UE 1, so that after receiving the connection setup request messagesent by the UE 2, the serving base station obtains the serviceinformation of the UE 1 locally or from the EPC entity device accordingto the application layer service information and/or service code of theUE 1 carried in the connection setup request message, adds the serviceinformation of the UE 1 to the connection setup request message sent bythe UE 2, and sends the connection setup request message to a corenetwork device after the service information of the UE 1 is added.

According to the above embodiment, a matched terminal can obtain QoSinformation, and guaranteed services can be provided for D2Dcommunication.

A person of ordinary skill in the art may understand that all or part ofthe steps in the method according to the embodiments can be implementedby hardware under the instruction of a program. The program may bestored in a computer readable storage medium and when the program runs,the steps in the method according to the embodiments are performed. Thestorage medium is any medium that can store program code, such as a ROM,a RAM, a magnetic disk, or an optical disc.

FIG. 5 is a schematic structural diagram of an embodiment of a firstuser equipment according to the present invention. The first userequipment in this embodiment may implement the procedure in theembodiment shown in FIG. 1 of the present invention, and the first userequipment supports a D2D function. As shown in FIG. 5, the first userequipment includes an obtaining module 51 and a broadcasting module 52.

The obtaining module 51 is configured to obtain a resource forbroadcasting information of the first user equipment, where theinformation of the first user equipment includes one or a combination ofan identifier, service information, a service code, and applicationlayer service information of the first user equipment.

The identifier may be: one or a combination of a physical identifier, aNAS ID, and an AS ID. For example, the physical identifier may be aspecific code sequence such as an IMSI. The NAS ID may be an s-TMSI oran old GUTI; and the AS ID may be a C-RNTI or a D-RNTI (namely, an RNTIused for D2D).

The application layer service information includes service informationthat a user may understand. The service information that the user mayunderstand includes a service type and/or service content. For example,the service content may be advertisement information, a video of amovie, or a game, and so on.

The service code may be a character, a character string, or a digitsequence, and may represent application layer service information.

The service information may be NAS information required by the firstuser equipment for constructing a connection setup request message of aservice, and include QoS information and so on.

The broadcasting module 52 is configured to broadcast the information ofthe first user equipment on the resource obtained by the obtainingmodule 51, so that a second user equipment supporting the D2D functionobtains the information of the first user equipment and after beingmatched with the first user equipment successfully, sends theinformation of the first user equipment to a network-side device to setup a connection with the first user equipment. Specifically, thebroadcasting module 52 may broadcast the information of the first userequipment on the obtained resource periodically in a DTX mode.

In the first user equipment, after the obtaining module 51 obtains theresource for broadcasting the information of the first user equipment,the broadcasting module 52 broadcasts the information of the first userequipment on the resource obtained by the obtaining module 51, where theinformation of the first user equipment includes one or a combination ofan identifier, service information, a service code, and applicationlayer service information of the first user equipment; and then a seconduser equipment supporting the D2D function may obtain the information ofthe first user equipment and after being matched with the first userequipment successfully, send the information of the first user equipmentto a network-side device to set up a connection with the first userequipment. In this way, a matched terminal can obtain QoS information,and guaranteed services can be provided for D2D communication.

FIG. 6 is a schematic structural diagram of another embodiment of afirst user equipment according to the present invention. Different fromthe first user equipment shown in FIG. 5, in the first user equipmentshown in FIG. 6, the obtaining module 51 may include a resourceobtaining submodule 511 and a first resource selecting submodule 512; orthe obtaining module 51 may include a second resource selectingsubmodule 513; or the obtaining module 51 may include a resourceobtaining submodule 511, a first resource selecting submodule 512, and asecond resource selecting submodule 513.

The resource obtaining submodule 511 is configured to obtain resourcesthat are allocated in advance by a serving base station of a cell wherethe first user equipment is currently located to user equipmentsupporting the D2D function in the cell and are used for broadcastingthe information of the user equipment, where the resources are broadcastby the serving base station through a broadcast message.

The first resource selecting submodule 512 is configured to select, byautomatic search or measurement, a resource whose interference level islower than a predetermined threshold, from the resources allocated inadvance by the serving base station.

The second resource selecting submodule 513 is configured to select,according to interference levels of sub-resources and positioninformation of the sub-resources that are broadcast by the serving basestation of the cell where the first user equipment is currently located,a sub-resource whose interference level is lower than a predeterminedthreshold, from the sub-resources broadcast by the serving base station,where the sub-resource is obtained after the serving base stationdivides resources that are allocated in advance by the serving basestation to user equipment supporting the D2D function in the cell andare used for broadcasting the information of the user equipment.

In this embodiment, the first user equipment may further include othermodules. A second sending module 53 is configured to send theapplication layer service information of the first user equipment to aservice management server before the broadcasting module 52 broadcaststhe information of the first user equipment. A receiving module 54 isconfigured to receive the service information corresponding to the firstuser equipment and the service code allocated by the service managementserver to the first user equipment. The service information is found bythe service management server according to the application layer serviceinformation of the first user equipment.

With the first user equipment, a matched terminal can obtain QoSinformation, and guaranteed services can be provided for D2Dcommunication.

FIG. 7 is a schematic structural diagram of another embodiment of afirst user equipment according to the present invention. Different fromthe first user equipment shown in FIG. 6, in the first user equipmentshown in FIG. 7, the obtaining module may include a connection setupsubmodule 514, which is configured to set up a connection with a servingbase station of a cell where the first user equipment is currentlylocated, and trigger the serving base station to allocate a resource tothe first user equipment to broadcast information of the first userequipment. Specifically, the connection setup submodule 514 may send anRRC connection setup message to the serving base station, where the RRCconnection setup message carries an information element indicating thatthe first user equipment supports the D2D function, and/or a value of asetup cause information element in the radio resource control connectionsetup message is D2D connection or D2D content publishing.

Further, in this embodiment, the first user equipment may furtherinclude a number of nodules. A maintaining module 55 is configured tomaintain a common connected state or a long discontinuous reception modein a connected state after the connection setup submodule 514 sets up aconnection with the serving base station of the cell where the firstuser equipment is currently located. A notifying module is configuredto, before the first user equipment leaves the cell, notify the servingbase station of recycling the resource that is allocated to the firstuser equipment and used for broadcasting the information of the firstuser equipment. A first sending module 57 is configured to, in theprocess of setting up a connection by the connection setup submodule 514with the serving base station of the cell where the first user equipmentis currently located, send the service information of the first userequipment, or the service information and application layer serviceinformation of the first user equipment, or the service information andservice code of the first user equipment, or the service information,application layer service information, and service code of the firstuser equipment to the serving base station or an EPC entity device.

With the first user equipment, a matched terminal can obtain QoSinformation, and guaranteed services can be provided for D2Dcommunication.

A person skilled in the art understands that the accompanying drawingsshow merely exemplary embodiments of the present invention and themodules or procedures in the accompanying drawings are not mandatory forthe implementation of the present invention.

A person skilled in the art understands the modules of the apparatusesin the embodiments may be disposed in the apparatuses as described inthe embodiments or disposed in one or more apparatuses other than theapparatuses in the embodiments. The modules according to the aboveembodiments may be combined into one module, or split into multiplesubmodules.

Finally, it should be noted that the foregoing embodiments are merelyintended for describing the technical solutions of the present inventionrather than limiting the present invention. Although the presentinvention is described in detail with reference to the foregoingembodiments, persons of ordinary skill in the art should understand thatthey may still make modifications to the technical solutions describedin the foregoing embodiments or make equivalent replacements to sometechnical features thereof, as long as such modifications orreplacements do not cause the essence of corresponding technicalsolutions to depart from the spirit and scope of the technical solutionsof the embodiments of the present invention.

What is claimed is:
 1. A method, comprising: receiving, by a first userequipment from a serving base station of a cell where the first userequipment is located, a broadcast message comprising informationidentifying resources allocated by the serving base station for deviceto device (D2D) communication, wherein each resource identified by thereceived information is allocated by the serving base station for D2Dcommunication; selecting, by the first user equipment, a resource fromthe resources allocated by the serving base station for D2Dcommunication; and sending, by the first user equipment to a second userequipment on the selected resource, information about the first userequipment.
 2. The method according to claim 1, wherein receiving thebroadcast message comprising the information identifying the resourcesallocated by the serving base station for D2D communication comprises:receiving the broadcast message from the serving base station, whereinthe broadcast message comprises the information identifying theresources allocated by the serving base station for D2D communication.3. The method according to claim 1, wherein the information about thefirst user equipment comprises: an identifier of the first userequipment; service information of the first user equipment; a servicecode of the first user equipment; application layer service informationof the first user equipment; or a combination of two or more of: theidentifier of the first user equipment, service information of the firstuser equipment, the service code of the first user equipment, or theapplication layer service information of the first user equipment. 4.The method according to claim 1, wherein sending the information aboutthe first user equipment comprises: periodically sending, by the firstuser equipment on the selected resource in a discontinuous transmissionmode, the information about the first user equipment.
 5. The methodaccording to claim 1, wherein the resources allocated by the servingbase station for D2D communication are semi-statically allocated by theserving base station.
 6. The method according to claim 1, whereinselecting the resource from the resources allocated by the serving basestation for D2D communication, comprises: selecting, by the first userequipment through automatic search or measurement, a resource of theresources identified by the received information whose interferencelevel is lower than a predetermined threshold.
 7. The method accordingto claim 1, wherein the information about the first user equipmentcomprises an identifier of the first user equipment.
 8. The methodaccording to claim 1, wherein the information about the first userequipment comprises service information of the first user equipment anda service code of the first user equipment.
 9. The method according toclaim 1, wherein the information about the first user equipmentcomprises two or more of an identifier of the first user equipment,service information of the first user equipment, a service code of thefirst user equipment, or application layer service information of thefirst user equipment.
 10. A device, applied to a first user equipment,the device comprising: a processor, configured to execute a programstored in a non-transitory computer readable storage medium, whereinexecution of the program causes the device to: receive, from a servingbase station of a cell where the device is located, a broadcast messagecomprising information identifying resources allocated by the servingbase station for device to device (D2D) communication, wherein eachresource identified by the received information is allocated by theserving base station for D2D communication; select a resource from theresources allocated by the serving base station for D2D communication;and send, to a second user equipment, information about the first userequipment on the selected resource.
 11. The device according to claim10, wherein the information about the first user equipment comprises: anidentifier of the first user equipment; service information of the firstuser equipment; a service code of the first user equipment; applicationlayer service information of the first user equipment; or a combinationof two or more of the identifier of the first user equipment, theservice information of the first user equipment, the service code of thefirst user equipment, or the application layer service information ofthe first user equipment.
 12. The device according to claim 10, whereinsending the information about the first user equipment comprises:periodically sending, in a discontinuous transmission mode on theselected resource, the information about the first user equipment. 13.The device according to claim 10, wherein the resources allocated by theserving base station for D2D communication are semi-statically allocatedby the serving base station.
 14. The device according to claim 10,wherein the execution of the program causes the device to: select,through automatic search or measurement, a resource of the resourcesidentified by the received information whose interference level is lowerthan a predetermined threshold.
 15. A non-transitory computer-readablestorage medium, storing a program comprising instructions, wherein whenbeing executed by a processor, the instructions cause a device to:receive, from a serving base station of a cell where a first userequipment is located, a broadcast message comprising informationidentifying resources allocated by the serving base station for deviceto device (D2D) communication, wherein each resource identified by thereceived information is allocated by the serving base station for D2Dcommunication; select a resource from the resources allocated by theserving base station for D2D communication; and send, to a second userequipment, the information about the first user equipment on theselected resource.
 16. A method, comprising: triggering, by a first userequipment, a serving base station of a cell where the first userequipment is located to allocate a resource for device to device (D2D)communication; obtaining, by the first user equipment, the resource fromthe serving base station; and sending, by the first user equipment to asecond user equipment on the obtained resource, information about thefirst user equipment, wherein the second user equipment sends theinformation about the first user equipment to a network device, to setup a connection between the first user equipment and the second userequipment.
 17. The method according to claim 16, wherein the informationabout the first user equipment comprises: an identifier of the firstuser equipment; service information of the first user equipment; aservice code of the first user equipment; application layer serviceinformation of the first user equipment; or a combination of two or moreof the identifier of the first user equipment, the service informationof the first user equipment, the service code of the first userequipment, or the application layer service information of the firstuser equipment.
 18. The method according to claim 16, wherein triggeringthe serving base station to allocate the resource for D2D communication,comprises: setting up a connection with the serving base station totrigger the serving base station to allocate the resource for D2Dcommunication.
 19. A device, applied to a first user equipment,comprising: a processor, configured to execute a program stored in anon-transitory computer readable storage medium, wherein execution ofthe program causes the device to: trigger a serving base station of acell where the first user equipment is located to allocate at least oneresource for device to device (D2D) communication; obtain the at leastone resource for D2D communication from the serving base station; andsend, to a second user equipment on a obtained at least one resource,information about the first user equipment, wherein the second userequipment sends the information about the first user equipment to anetwork device, to set up a connection between the first user equipmentand the second user equipment.
 20. The device according to claim 19,wherein the information about the first user equipment comprises: anidentifier of the first user equipment; service information of the firstuser equipment; a service code of the first user equipment; applicationlayer service information of the first user equipment; or a combinationof two or more of the identifier of the first user equipment, theservice information of the first user equipment, the service code of thefirst user equipment, or the application layer service information ofthe first user equipment.
 21. The device according to claim 19, whereinthe execution of the program causes the device to: set up a connectionwith the serving base station to trigger the serving base station toallocate the resource for D2D communication.